package com.dfs.parent.service.property;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

@Data //lombok
@Component
@ConfigurationProperties(prefix = "user")
@RefreshScope //动态刷新
public class MyProperties {

    private String name;

    private int age;

}